package com.mhc.suzuki.service;

import com.mhc.haval.security.model.User;
import com.mhc.suzuki.dal.model.PaymentRequestDO;
import com.mhc.suzuki.exception.SuzukiCommonException;
import com.mhc.suzuki.vo.PaymentRequestVO;

import java.util.List;

/**
 * 请求垫资业务类
 * Created by kanon on 2017/8/23.
 */
public interface PaymentRequestService {

    /**
     * 根据订单号获取请求垫资信息
     *
     * @param orderNO
     * @return
     */
    PaymentRequestVO getPaymentRequest(String orderNO);

    /**
     * 获取垫资列表
     *
     * @param orderNO
     * @param applyStatus
     * @return
     */
    List<PaymentRequestVO> getPaymentRequestList(String orderNO, Integer applyStatus);

    /**
     * 新增或者更新垫资
     *
     * @param paymentRequestDO
     * @return
     */
    Boolean addOrUpdatePaymentRequest(PaymentRequestDO paymentRequestDO);

    /**
     * 发起打款申请，新增记录到垫款申请表
     *
     * @param orderNo
     * @param logedUser
     * @return
     * @throws SuzukiCommonException
     */
    Boolean savePaymentRequest(String orderNo, User logedUser) throws SuzukiCommonException;

}
